package net.zjitc.controller;

import net.zjitc.pojp.CateGory;
import net.zjitc.service.AdminCateGoryService;
import net.zjitc.service.impl.AdminCateGoryServiceImpl;
import net.zjitc.utils.dispacher.URLMapping;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * Created by lenovo on 2017/12/10.
 */
public class IndexController {
    AdminCateGoryService cateGoryService=new AdminCateGoryServiceImpl();
    @URLMapping(url="/index")
    public String index(HttpServletRequest request, HttpServletResponse response){
       //准备数据 1.一级分类 2.热销商品 3.最新商品
        List<CateGory> clist=cateGoryService.findOneList();
        request.setAttribute("clist",clist);
        return "/WEB-INF/user/index.jsp";
    }
}
